<template>
    <main class="faq">
        <h1>Frenquently Asked Questions</h1>
        <Loading v-if="remoteDataBusy"></Loading>
        <div class="error" v-if="hasRemoteErrors">
            Can't load the questions!
        </div>
        <section class="list">
            <article v-for="question of questionList" :key="question._id">
                <h2 v-html="question.title"></h2>
                <p v-html="question.content"></p>
            </article>
        </section>
    </main>
</template>
<script>
import RemoteData from '../mixins/RemoteData'

export default {
    // mixins: [
    //     RemoteData
    // ],
    mixins: [
        RemoteData({questionList: 'questions'}), 
    ],
    data(){
        return {
            // questions:[],   采用mixin,这个不需要了,数据在mixin那边请求
            //error: null,      同上
            //loading: false,
        }
    },
 
}
</script>
